import React from "react";
import {Result} from "antd";
import {SmileOutlined} from "@ant-design/icons"

const ShowResultInfo: React.FC<{
    param: {
        status: String,
        info: String
    }
}> = (props) => {
    if (props.param.status == 'none') {
        return <></>
    } else if (props.param.status == 'empty') {
        return <Result
            icon={<SmileOutlined/>}
            title={props.param.info}
        />
    } else if(props.param.status == 'save'){
        return <Result
            icon={<SmileOutlined/>}
            title={props.param.info}
        />
    }else {
        return <Result
            // @ts-ignore
            status={props.param.status}
            title={props.param.info}
        />
    }
}

export default ShowResultInfo;